C Program to find sum of all elements of an array